#pragma once
#include "Material.h"
class AOMaterial : public Material {
private:
	shared_ptr<Material> material;
	Double minDistance, maxDistance;
	int sampleCount;
	bool selfShadowingOnly = false;

public:
	AOMaterial(Double minDistance = 0, Double maxDistance = 1, Float strength = 1, int sampleCount = 8);
	AOMaterial(shared_ptr<Material> material, Double minDistance = 0, Double maxDistance = 1, Float strength = 1, int sampleCount = 8);
	~AOMaterial() {}

	void setDistance(Double minDistance, Double maxDistance);
	void setSampleCount(int sampleCount);
	void setSelfShadowingOnly(bool value);

	virtual Color shade(const Scene *scene, const Ray &ray, const IntersectResult &intersect, const TraceState & traceState) const;
};

